#include <iostream>

using namespace std;

//函数重载注意事项
//1、引用作为重载的条件

void fun(int &a)
{
    cout << "func(int &a)调用" << endl;
}

void fun(const int &a)
{
    cout << "func(const int &a)调用" << endl;
}

//2、函数重载碰到默认参数
void func2(int a, int b = 10)
{
    cout << "func2(int a, int b = 10)调用" << endl;
}

void func2(int a)
{
    cout << "func2(int a)调用" << endl;
}

int main(void)
{
    int a = 10;
    fun(a);
    fun(10);

    //func2(10);
    //此时出现歧义

    return 0;
}